package com.my.chapter15;

public class practice25 {
    static <POWER extends XRayVersion> void see(POWER power){
        power.seeThroughWalls();
    }
    static <POWER extends SuperHearing2> void hear(POWER power){
        power.hearSubtleNoises();
    }

    public static void main(String[] args) {
        SuperHero2 hero = new SuperHero2();
        see(hero);
        hear(hero);
    }
}

interface XRayVersion{
    void seeThroughWalls();
}

interface SuperHearing2{
    void hearSubtleNoises();
}

class SuperHero2 implements XRayVersion,SuperHearing2{

    @Override
    public void seeThroughWalls() {
        System.out.println("SuperHero.seeThroughWalls");
    }

    @Override
    public void hearSubtleNoises() {
        System.out.println("SuperHero.hearSubtleNoises");
    }
}

